feat: 과정 목록 조회 시 완전한 데이터 보유 과정 우선 표시#113
Merged
Merged
Conversation
3 tasks
yongseong123
force-pushed
the
feat/prioritize-complete-courses
branch
from
June 24, 2026 06:24
33a6f75 to
621475e
Compare
- findOrJoin() 헬퍼 추가: 동일 Specification 체인 내 course/institution JOIN을 재사용하여 orderBySatisfaction + orderByCompleteDataFirst 조합 시 발생하던 중복 JOIN 방지 - reviewCount/crawledReviewCount COUNT 서브쿼리를 EXISTS 서브쿼리로 교체: 첫 번째 일치 행에서 단락(short-circuit)되어 row별 집계 비용 제거
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
관련 이슈
Closes #112
개요
GET /api/courses에prioritizeFull파라미터를 추가하여, 기관 이미지·만족도·취업률·별점이 모두 있는 과정을 기존 정렬 순서 안에서 우선 노출합니다.변경 내용
CourseListRequest.javaBoolean prioritizeFull필드 추가null/false이면 기존 동작 유지 (하위 호환성 보장)CourseSessionSpecification.javaorderByCompleteDataFirst()— 완전한 데이터 우선순위(CASE WHEN) 표현식을 기존 ORDER BY 앞에 삽입orderByLatest()/orderBySatisfaction()/orderByEmploymentRate()— Pageable Sort 대신 Criteria ORDER BY로 정렬할 수 있도록 추가CourseService.javaprioritizeFull=true시 LATEST/SATISFACTION/EMPLOYMENT_RATE 정렬을 Criteria ORDER BY로 전환orderByCompleteDataFirst()를 체이닝하여 완전성 우선순위 적용우선순위 판단 기준
다음 4가지를 모두 만족하는 과정이 앞에 노출됩니다.
institution.profileImageUrl IS NOT NULLcourse.stdgScor IS NOT NULLsession.employmentRate IS NOT NULLReview또는CrawledReview에 리뷰 1건 이상동작 방식
prioritizeFull=false또는 미전달: 기존 정렬 동작 그대로 유지prioritizeFull=true: ORDER BY 앞에completePriority(0 or 1)삽입 → 완전한 과정이 기존 정렬 내 앞쪽에 위치테스트 체크리스트
prioritizeFull=true+ 최신순: 완전한 과정이 앞에 오고 그 안에서 최신순 유지prioritizeFull=true+ 만족도순/취업률순/마감임박순/인기순 동일 확인prioritizeFull=false(미전달): 기존 정렬 결과와 동일한지 확인